package fz.vrd.ui.toast;


import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;

import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;

/**
 * <b>名称：  <br/>
 * <b>创建人： VinRichard <br/>
 * <b>时间： 2021/6/10 10:43 <br/>
 * <b>备注：{ } <br/>
 */
class ToastImp implements Toast_I {

    public ToastImp() {

    }

    @Override
    public Toast build(Application context) {
        ToastUtils.getInstance().build(context);
        return this;
    }

    @Override
    public void showSys(Context context, String msg) {
        android.widget.Toast.makeText(context, msg, android.widget.Toast.LENGTH_SHORT).show();
    }

    @Override
    public void showNomal(Context context, String msg) {
        ToastUtils.onDefaultWithoutIconShowToast(msg);
    }

    @Override
    public void showWarm(Context context, String msg) {
        ToastUtils.onWarnShowToast(msg);
    }

    @Override
    public void showError(Context context, String msg) {
        ToastUtils.onErrorShowToast(msg);
    }

    @Override
    public void showSuccess(Context context, String msg) {
        ToastUtils.onSuccessShowToast(msg);
    }

    @Override
    public void show(Context context,String message, @DrawableRes int iconID, @ColorRes int textColor,@DrawableRes int toastDrawableID) {
        ToastUtils.showToast(message,iconID,textColor, android.widget.Toast.LENGTH_SHORT,toastDrawableID);
    }
}
